diff options
Diffstat (limited to 'src/pages/blog/[...slug].astro')
| -rw-r--r-- | src/pages/blog/[...slug].astro | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 12436c2..eb88f66 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -1,18 +1,18 @@ --- -import { CollectionEntry, getCollection } from 'astro:content'; +import { CollectionEntry, getCollection, render } from 'astro:content'; import BlogPost from '../../layouts/BlogPost.astro'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ - params: { slug: post.slug }, + params: { slug: post.id }, props: post, })); } type Props = CollectionEntry<'blog'>; const post = Astro.props; -const { Content } = await post.render(); +const { Content } = await render(post); --- <BlogPost {...post.data}> |
